package com.example.project.projectspringcloud.dao.user;

import com.example.project.projectspringcloud.dao.BaseMapper;
import com.example.project.projectspringcloud.entity.user.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * get all user-role relation by user id
     * @param userId
     * @return
     */
    List<Role> selectAllByRelationUserId(@Param("userId") Integer userId);
}